var Mock = require('mockjs');

exports.response = function(req, res) {
  return Mock.mock({
    "msg": "OK",
    "code": 0,
    "data": {
      "fieldList": [
        {
          "name": "交易员",
          "id": "trader"
        }, {
          "name": "基金编号",
          "id": "groupid"
        }, {
          "name": "数据日期",
          "id": "dataDate"
        }, {
          "name": "持仓",
          "id": "holdsNum"
        }, {
          "name": "起始资金",
          "id": "beginCash"
        }, {
          "name": "总盈亏",
          "id": "allTimePnl"
        }, {
          "name": "盈利总和",
          "id": "profitPnl"
        }, {
          "name": "亏损总和",
          "id": "lossPnl"
        }, {
          "name": "日均盈亏",
          "id": "dayPnl"
        }, {
          "name": "交易次数",
          "id": "tradeCount"
        }, {
          "name": "盈利次数",
          "id": "reapProfit"
        }, {
          "name": "亏损次数",
          "id": "lossTime"
        }, {
          "name": "平均收益率",
          "id": "averageReturnRate"
        }, {
          "name": "市值利用率",
          "id": "utilizationRatio"
        }, {
          "name": "交易总市值",
          "id": "tradeTotalMarketValue"
        }, {
          "name": "持仓市值",
          "id": "marketValue"
        }, {
          "name": "市值收益率",
          "id": "marketValueYield"
        }, {
          "name": "获利收益率",
          "id": "profitYield"
        }, {
          "name": "亏损收益率",
          "id": "lossYield"
        }, {
          "name": "盈亏比",
          "id": "profitLossRatio"
        }, {
          "name": "最大单笔亏损率",
          "id": "maximumLoss"
        }, {
          "name": "历史天数",
          "id": "historyDays"
        }, {
          "name": "最长连赢天数",
          "id": "streak"
        }, {
          "name": "天数胜率",
          "id": "winningDayRatio"
        }, {
          "name": "交易胜率",
          "id": "winRatio"
        }, {
          "name": "平均持仓时间",
          "id": "avgHoldPeriodMin"
        }, {
          "name": "股票详情列表",
          "id": "stock_detail"
        }
      ],
      "trader": {
        "trader": "total",
        "groupid": "503,547",
        "dataDate": "2018-03-27",
        "allTimePnl": 12717.45,
        "profitPnl": 20610.75,
        "lossPnl": -7893.31,
        "dayPnl": 12717.4466,
        "tradeCount": 81,
        "reapProfit": 55,
        "lossTime": 26,
        "averageReturnRate": 0.001,
        "utilizationRatio": 0.0828,
        "tradeTotalMarketValue": 12374957.89,
        "marketValue": 149520813.23,
        "marketValueYield": 0.000085,
        "profitYield": 0.002318,
        "lossYield": -0.0022,
        "profitLossRatio": 1.0536,
        "maximumLoss": -0.00738,
        "historyDays": 1,
        "streak": 1,
        "winningDayRatio": 1,
        "winRatio": 0.679,
        "avgHoldPeriodMin": 16.3,
        "holdsNum": 69,
        "beginCash": 24642051.7
      },
      "list": [
        {
          "trader": "54703",
          "groupid": "547",
          "dataDate": "2018-03-27",
          "allTimePnl": 6842.17,
          "profitPnl": 7956.78,
          "lossPnl": -1114.61,
          "dayPnl": 6842.171,
          "tradeCount": 16,
          "reapProfit": 13,
          "lossTime": 3,
          "averageReturnRate": 0.0015,
          "utilizationRatio": 0.0774,
          "tradeTotalMarketValue": 4568595.03,
          "marketValue": 59033364.67,
          "marketValueYield": 0.000116,
          "profitYield": 0.001911,
          "lossYield": -0.0012,
          "profitLossRatio": 1.5925,
          "maximumLoss": -0.00137,
          "historyDays": 1,
          "streak": 1,
          "winningDayRatio": 1,
          "winRatio": 0.8125,
          "avgHoldPeriodMin": 1.2885,
          "holdsNum": 16,
          "beginCash": 6729796.73
        }, {
          "trader": "54702",
          "groupid": "547",
          "dataDate": "2018-03-27",
          "allTimePnl": 2998.77,
          "profitPnl": 7127.41,
          "lossPnl": -4128.64,
          "dayPnl": 2998.7677,
          "tradeCount": 13,
          "reapProfit": 7,
          "lossTime": 6,
          "averageReturnRate": 0.0007,
          "utilizationRatio": 0.1209,
          "tradeTotalMarketValue": 4032100.95,
          "marketValue": 33340723.98,
          "marketValueYield": 0.00009,
          "profitYield": 0.003059,
          "lossYield": -0.0026,
          "profitLossRatio": 1.1765,
          "maximumLoss": -0.00382,
          "historyDays": 1,
          "streak": 1,
          "winningDayRatio": 1,
          "winRatio": 0.5385,
          "avgHoldPeriodMin": 2.1936,
          "holdsNum": 11,
          "beginCash": 5522721.5
        }, {
          "trader": "54705",
          "groupid": "547",
          "dataDate": "2018-03-27",
          "allTimePnl": 1486.51,
          "profitPnl": 2154.22,
          "lossPnl": -667.71,
          "dayPnl": 1486.51,
          "tradeCount": 31,
          "reapProfit": 20,
          "lossTime": 11,
          "averageReturnRate": 0.0011,
          "utilizationRatio": 0.0708,
          "tradeTotalMarketValue": 1321459.11,
          "marketValue": 18674559.9,
          "marketValueYield": 0.00008,
          "profitYield": 0.001976,
          "lossYield": -0.0024,
          "profitLossRatio": 0.8233,
          "maximumLoss": -0.00738,
          "historyDays": 1,
          "streak": 1,
          "winningDayRatio": 1,
          "winRatio": 0.6452,
          "avgHoldPeriodMin": 3.8484,
          "holdsNum": 9,
          "beginCash": 1297995.1
        }, {
          "trader": "54701",
          "groupid": "547",
          "dataDate": "2018-03-27",
          "allTimePnl": 1390,
          "profitPnl": 3372.35,
          "lossPnl": -1982.35,
          "dayPnl": 1389.9979,
          "tradeCount": 21,
          "reapProfit": 15,
          "lossTime": 6,
          "averageReturnRate": 0.0006,
          "utilizationRatio": 0.0638,
          "tradeTotalMarketValue": 2452802.8,
          "marketValue": 38472164.68,
          "marketValueYield": 0.000036,
          "profitYield": 0.00278,
          "lossYield": -0.0019,
          "profitLossRatio": 1.4632,
          "maximumLoss": -0.0032,
          "historyDays": 1,
          "streak": 1,
          "winningDayRatio": 1,
          "winRatio": 0.7143,
          "avgHoldPeriodMin": 54.8508,
          "holdsNum": 33,
          "beginCash": 3089414.75
        }
      ]
    }
  })
}
